package com.yeban.javase.day12.demo;

import java.util.function.Function;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/22
 */
//将String类型转换为Integer类型
public class TestFunction {
    public static void main(String[] args) {
        method(s->Integer.parseInt(s));
    }

    private static Integer method(Function<String,Integer> function){
        int num =  function.apply("10");
        System.out.println(num);
        return num;
    }
}
